Page({
  onLoad({
    point,
    building
  }) {
    this.fake(point, building)
  },
  fake(point, building) {
    const size = Math.floor(Math.random() * 5) + 4 // 生成4-8的随机数
    const rooms = []
    for (let i = 0; i < size; i++) {
      // 生成楼层号
      const floor = Math.floor(Math.random() * 19) + 1
      // 生成房间号
      const No = Math.floor(Math.random() * 2) + 1
      // 拼接 1203 
      const room = floor + '0' + No
      // console.log(room);
      if (rooms.includes(room)) continue
      rooms.push(room)
    }
    this.setData({
      rooms,
      point,
      building
    })
  }
})